﻿using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
namespace Tank
{
    class Map
    {
        public static char[,] map;
        public static int x = 10;  //rozmer polia
        public static int y = 10;  // rozmer polia
        public static int sirka; // sirka polia
        public static int vyska; // vyska polia
        public static bool change = false;
        //public static int typ = 1;

        public static void Nacitaj()
        {
            sirka = HraciaPlocha.SIRKA * 8 / 10 / 10;
            vyska = HraciaPlocha.VYSKA / 10;

            map = new char[x, y];
            try
            {
                StreamReader s = new StreamReader(@"map\map.dat");
                for (int i = 0; i < x; i++)
                {
                    for (int j = 0; j < y; j++)
                    {
                        map[i, j] = (char)s.Read();
                    }
                    s.ReadLine();
                }
            }
            catch (Exception)
            {
                throw new Exception("File not found");
            }
        }
    }
}